home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / bananamonkey.swf / scripts / frame_19 / PlaceObject2_324_181 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2006-06-19  |  938 b   |  44 lines

  1. onClipEvent(enterFrame){
  2.    if(_root.amitavalife < 3)
  3.    {
  4.       _visible = true;
  5.    }
  6.    if(this.hitTest(_root.monkey) && _root.amitavalife < 3)
  7.    {
  8.       if(pl == 1)
  9.       {
  10.          _root.amitavalife += 1;
  11.          this.play();
  12.          pl = 0;
  13.       }
  14.    }
  15.    if(this.hitTest(_root.b3) || this.hitTest(_root.b5) || this.hitTest(_root.b6) || this.hitTest(_root.b7))
  16.    {
  17.       _X = _X - 3;
  18.       if(_X <= -500)
  19.       {
  20.          rad = random(3);
  21.          if(rad == 0)
  22.          {
  23.             _X = _root.b6._x;
  24.             _Y = _root.b6._y;
  25.          }
  26.          else if(rad == 1)
  27.          {
  28.             _X = _root.b7._x;
  29.             _Y = _root.b7._y;
  30.          }
  31.          else if(rad == 2)
  32.          {
  33.             _X = _root.b5._x;
  34.             _Y = _root.b5._y;
  35.          }
  36.          else if(rad == 3)
  37.          {
  38.             _X = _root.b3._x;
  39.             _Y = _root.b3._y;
  40.          }
  41.       }
  42.    }
  43. }
  44.